This forum is closed to new posts and
responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:
I get a lot of Emails which are the same but come via different route (eg direct to me, via a group, via an alias etc) so I often get 2-3 copies of basically the same email (when people use reply all usually). So I created this JAVA Agent to remove the duplicates in my inbox. I am posting in case it is useful to others.
From the inbox viw, use the create menu to create an Agent, select Java and paste the code below in. Rename the agent ScanForDuplicateEmails2Remove (or similar) and save. It should appear on your Inbox actions, click and let it run. If you want to observe the progress open the Java debug console on the tools menu.
This will Delete to Trash so you can check the decisions before permenant delete. I also set an initail Limit of 20 duplicates per run but you can increase this depending on your machine speed and number of emails to process.
View vw = currentDb.getView ("By Person"); // this view exists in r8 mail template; may need to change for earlier versions
Document doc = vw.getFirstDocument();
System.out.println ("Initiating Scan of Mail for duplicates - limited to moving max " + dupLimit + " duplicates to trash each run");
duplicatesFoundi=0;
lastDDate = doc.getCreated();
lastDoc=doc;